package com.example.java_chatroom.utils;

import java.text.SimpleDateFormat;
import java.util.Date;

import static java.time.LocalTime.now;

public class DateUtils {
    public static String dateFormat(Date date) {
        SimpleDateFormat format = new SimpleDateFormat("M.d HH:mm:ss");
        return format.format(date);
    }

    public static void main(String[] args) {
        System.out.println(dateFormat(new Date(System.currentTimeMillis())));
    }
}
